<template>
	<view class="home">
		<view class="uni-margin-wrap">
			<!-- 轮播图盒子 -->
			<swiper class="swiper">
				<swiper-item v-for="userData in userDataList" :key="userData.id">
					<!-- 当前动态 -->
					<view class="swiper-item">
						<!-- 滚动视图 -->
						<scroll-view class="scroll-view" scroll-y="true">
							<!-- 轮播图盒子 -->
							<view class="card-box">
								<u-swiper height="300px" :list="userData.imageList" indicator indicatorMode="line"
									circular></u-swiper>
							</view>
							<!-- 个人信息盒子 -->
							<view class="msg-box">
								<!-- 用户名 -->
								<view class="per-name">
									<span class="name">{{userData.name}}<img class="sex" src="@/static/icon/男.png"
											alt=""></span>
									<img class="xq" src="@/static/icon/详情.png" alt="">
								</view>
								<!-- 学校/认证 -->
								<view class="school">
									<span>{{userData.schoolName}}</span>
									<span class="sure">未实名认证</span>
								</view>
								<!-- 详情盒子 -->
								<view class="details-box">
									<view class="del-left">
										<view class="sch-on">
											<img class="ico" src="@/static/icon/用户.png" alt="">
											<span>
												{{userData.age}}岁
												{{userData.userHeight}}
												{{userData.constellation}}
											</span>
										</view>
										<view class="sch-on">
											<img class="ico" src="@/static/icon/文件.png" alt="">
											<span>{{userData.userStatus}}</span>
										</view>
										<view class="sch-on">
											<img class="ico" src="@/static/icon/房子.png" alt="">
											<span>{{userData.placeOfDomicile}}人</span>
										</view>
									</view>
									<view class="del-right">
										<view class="sch-on">
											<img class="ico" src="@/static/icon/定位-位置.png" alt="">
											<span>现居{{userData.presentAddress}}</span>
										</view>
										<view class="sch-on">
											<img class="ico" src="@/static/icon/爱心.png" alt="">
											<span>未婚·正在寻觅</span>
										</view>
									</view>
								</view>
								<!-- 签名盒子 -->
								<view class="line-box">
									<view class="about">
										<img class="ico" src="@/static/icon/面性本子vg.png" alt="">
										<span class="tle">关于我</span>
									</view>
									<view class="conta">
										{{userData.selfIntroduction}}
									</view>
								</view>
								<!-- 情感 -->
								<view class="line-box">
									<view class="about">
										<img class="ico" src="@/static/icon/相机.png" alt="">
										<span class="tle">兴趣爱好</span>
									</view>
									<view class="conta">
										{{userData.interest}}
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<!-- 按钮盒子 -->
		<view class="container">
			<view class="bottom-bar">
				<view class="bottom-bar-item" @tap="onDelete">
					<text class="iconfont icon-delete"></text>
					<text>删除</text>
				</view>
				<view class="bottom-bar-item" @tap="onFollow">
					<text class="iconfont icon-follow"></text>
					<text>关注</text>
				</view>
				<view class="bottom-bar-item" @tap="onPrivateMessage">
					<text class="iconfont icon-message"></text>
					<text>私信</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userDataList: [{
						id: '',
						name: '江流儿',
						sex: 0,
						age: '23',
						phoneNumber: 'XXXXXXXXXXX', //手机号
						userHeight: '180', //身高
						userWeight: '', //体重
						constellation: '天秤座', //星座
						userStatus: '学生', //身份
						schoolName: '青岛大学 | 本科 · 全日制', //学校
						presentAddress: '青岛', //现居地
						placeOfDomicile: '山东青岛', //户籍所在地
						selfIntroduction: '性格比较开朗很温柔喜欢小吃喜欢一切浪漫的事情，看海买花，想多出去走走看看。魔蝎座一枚，是纯纯恋爱脑，比较慢热哦，希望可以多一些时间去了解。', //个人介绍
						interest: '很喜欢出去走走看看吧，然后不太喜欢宅在家里，喜欢安静一点的氛围，会打打游戏刷刷剧，还有一部分时间泡在琴房', //兴趣
						hobby: '', //爱好
						pushFlag: true, //是否推送
						imageList: [ // 自拍图片
							'https://img14.360buyimg.com/pop/jfs/t1/141395/33/33088/130888/63a855b3Ed8693d1b/0f58ce76658568ab.jpg',
							'https://img14.360buyimg.com/pop/jfs/t1/195377/13/31196/68615/63a855b2Ecb462df7/a606609f78f03278.jpg',
							'https://img14.360buyimg.com/pop/jfs/t1/140509/35/32276/63045/63a855b3Edc514828/0630c33fc9a4de09.jpg',
							'https://img1.baidu.com/it/u=1654116597,1898067478&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
							'https://img14.360buyimg.com/pop/jfs/t1/94527/8/28287/71745/63a855b4E678e91f1/acbd0eb3bbb1072c.jpg'
						]
					},
					{
						id: '',
						name: '周杰伦',
						sex: 0,
						age: '23',
						phoneNumber: 'XXXXXXXXXXX', //手机号
						userHeight: '180', //身高
						userWeight: '', //体重
						constellation: '天秤座', //星座
						userStatus: '学生', //身份
						schoolName: '青岛大学 | 本科 · 全日制', //学校
						presentAddress: '青岛', //现居地
						placeOfDomicile: '山东青岛', //户籍所在地
						selfIntroduction: '性格比较开朗很温柔喜欢小吃喜欢一切浪漫的事情，看海买花，想多出去走走看看。魔蝎座一枚，是纯纯恋爱脑，比较慢热哦，希望可以多一些时间去了解。', //个人介绍
						interest: '很喜欢出去走走看看吧，然后不太喜欢宅在家里，喜欢安静一点的氛围，会打打游戏刷刷剧，还有一部分时间泡在琴房', //兴趣
						hobby: '', //爱好
						pushFlag: true, //是否推送
						imageList: [ // 自拍图片
							'https://img14.360buyimg.com/pop/jfs/t1/141395/33/33088/130888/63a855b3Ed8693d1b/0f58ce76658568ab.jpg',
							'https://img14.360buyimg.com/pop/jfs/t1/195377/13/31196/68615/63a855b2Ecb462df7/a606609f78f03278.jpg',
							'https://img14.360buyimg.com/pop/jfs/t1/140509/35/32276/63045/63a855b3Edc514828/0630c33fc9a4de09.jpg',
							'https://img1.baidu.com/it/u=1654116597,1898067478&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
							'https://img14.360buyimg.com/pop/jfs/t1/94527/8/28287/71745/63a855b4E678e91f1/acbd0eb3bbb1072c.jpg'
						]
					}
				]

			}
		},
		methods: {
			onDelete() {
				console.log('点击了删除按钮');
				// 在这里实现删除功能
			},
			onFollow() {
				console.log('点击了关注按钮');
				// 在这里实现关注功能
			},
			onPrivateMessage() {
				console.log('点击了私信按钮');
				// 在这里实现私信功能
			},
		},

	}
</script>

<style lang="scss" scoped>
	$man-color: rgb(117, 124, 255);
	$man-backcolor: linear-gradient(132deg, rgba(117, 124, 255, 1) 20%, rgba(255, 255, 255, 1) 100%);
	$woman-color: rgb(255, 117, 152);
	$woman-backcolor: linear-gradient(132deg, rgba(255, 117, 152, 1) 20%, rgba(255, 255, 255, 1) 100%);

	.home {
		width: 100vw;

		.uni-margin-wrap {
			width: 690rpx;
			width: 100%;

			.swiper {
				height: 100vh;

				.scroll-view {
					width: 90vw;
					height: 100vh;
					margin: 0 auto;

					.card-box {
						width: 100%;
						height: 300px;
						border-radius: 15px;

						._swiper {
							width: 100%;
							height: 100%;
						}
					}

					.msg-box {
						width: 100%;
						border-radius: 15px;
						background-color: #fff;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						box-sizing: border-box;
						margin-top: 15px;
						padding: 5vw;
						background: $man-backcolor;

						.per-name {
							width: 100%;
							border-radius: 15px;
							display: flex;
							justify-content: space-between;

							.name {
								font-size: 25px;
								font-weight: bold;

								.sex {
									width: 20px;
									height: 20px;
								}
							}

							.xq {
								width: 30px;
								height: 30px;
							}
						}
					}

				}

				.school {
					font-size: 14px;
					display: flex;
					justify-content: space-between;
					align-items: center;
					width: 100%;
					margin-top: 15px;

					.sure {
						font-size: 12px;
						padding: 2px 5px 2px 5px;
						background-color: orange;
						border-radius: 5px;
						font-weight: bold;
						color: #fff;
					}
				}

				.details-box {
					width: 100%;
					height: 150px;
					margin: 0 auto;
					border-radius: 20px;
					background-color: #eee;
					margin-top: 15px;
					display: flex;
					flex-direction: row;

					.del-left {
						width: 50vw;
						height: 150px;
						// background-color: #987456;
						border-radius: 20px 0 0 20px;
						padding: 10px 0 0 10px;
					}

					.del-right {
						width: 44vw;
						height: 150px;
						// background-color: #365241;
						border-radius: 0 20px 20px 0;
						padding: 10px 0 0 10px;
					}
				}

				.line-box {
					margin-top: 15px;
					width: 100%;
					// background-color: #568415;
					padding: 10px 0 20px 0;
				}

				.sch-on {
					margin-top: 15px;
				}

				.tle {
					font-size: 18px;
				}

				.ico {
					width: 15px;
					height: 15px;
					margin-right: 10px;
				}

				.conta {
					margin-top: 10px;
					text-indent: 2em;
				}
			}
		}
	}

	.container {
		width: 100vw;
		display: flex;
		flex-direction: column;
		position: fixed;
		bottom: 20rpx;
		left: 0px;

		.bottom-bar {
			width: 90vw;
			margin: 0 auto;
			display: flex;
			justify-content: space-evenly;
			align-items: center;
			height: 50px;
			// box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);

			.bottom-bar-item {
				display: flex;
				flex-direction: column;
				width: 100rpx;
				height: 100rpx;
				background-color: aqua;
				border-radius: 50%;
				text-align: center;
				line-height: 100rpx;

				.iconfont {
					font-size: 20px;
				}

				text {
					font-size: 14px;
				}
			}
		}
	}
</style>